<%-- 
    Document   : member_post_management
    Created on : May 27, 2014, 5:20:22 PM
    Author     : Tuyen
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </head>
<div id="wrapper_list_post">
    <div id="post_content">
        <form name="form" action="/JudiBlog/MemberPostManagement" method="Post" enctype="multipart/form-data">
            <div id="post_list">
                <table>
                    <tr id="post_title">
                        <td id="col_title">Title</td>
                        <td id="col_user">User</td> 
                        <td id="col_date">Date post</td> 
                        <td id="col_cat">Category</td> 
                        <td id="col_active">Active</td> 
                        <td id="col_delete">Delete</td> 
                        <td id="col_edit">Edit</td> 
                    </tr>
                    <c:forEach items="${listPost}" var="item">
                        <tr class="post_row">
                            <td class="col_title"><a href="#">${item.title}</a></td> 
                            <td><a href="#">${item.user.fullName}</a></td> 
                            <td>${item.postDate}</td> 
                            <td>${item.category.catName}</td> 
                            <td class="col_active">
                                <c:if test="${item.isActive() == true}">
                                    <a href="memberpostmanagement?action=disable&postID=${item.postID}"><img src="/JudiBlog/img/enable.png" alt="enable"/></a>
                                    </c:if>
                                    <c:if test="${item.isActive() != true}">
                                    <a href="memberpostmanagement?action=enable&postID=${item.postID}"><img src="/JudiBlog/img/disable.png" alt="disable"/></a>
                                    </c:if>
                            </td> 
                            <td class="col_delete"><a href="memberpostmanagement?action=delete&postID=${item.postID}"><img src="/JudiBlog/img/delete.png" alt="delete"/></a></td> 
                            <td class="col_edit"><a href="memberpostmanagement?action=edit&postID=${item.postID}"><img src="/JudiBlog/img/enable.png" alt="edit"/></a></td> 
                        </tr>
                        <td class="line" colspan="7"></td>
                    </c:forEach>
                </table>
            </div>
        </form>
    </div>
</div>
